// vue-echarts
import {
  BarChart,
  EffectScatterChart, LineChart,
  MapChart,
  PieChart
} from 'echarts/charts'
import {
  DatasetComponent,
  DataZoomComponent,
  GeoComponent,
  GridComponent,
  LegendComponent,
  MarkPointComponent,
  TitleComponent,
  TooltipComponent,
  VisualMapComponent
} from 'echarts/components'
import { use } from "echarts/core"
import {
  CanvasRenderer
} from 'echarts/renderers'
import ECharts from 'vue-echarts'

  use([
    CanvasRenderer,
    BarChart,PieChart,MapChart,EffectScatterChart,LineChart,
    GridComponent,
    LegendComponent,
    TooltipComponent,
    TitleComponent,
    DatasetComponent,
    VisualMapComponent,
    GeoComponent,
    MarkPointComponent,
    DataZoomComponent
  ])

  export const registerEcharts= (app:any)=>{
    app.component('v-chart', ECharts)
  }